package com.onefish.toolkit.controller;

import com.onefish.toolkit.DesignPatterns;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class DesignController {
    @Autowired
    private DesignPatterns designPatterns;

    @GetMapping("/query")
    public String query(String type){
        return designPatterns.getResult(type);
    }
}
